import React from 'react'
import { View, Image } from '@tarojs/components'

import './index.scss'

export interface IEmptyProps {
    img?: string
    desc?: string
}

export const Empty: React.FC<IEmptyProps> = ({
    img,
    desc,
    children
}) => {

    return (
        <View className="xxm-empty-ls">
            <View className="xxm-empty-ls__image">
                {
                    img && <Image
                        src={img}
                        className="xxm-empty-ls__image__img"
                    />
                }
            </View>
            <View className="xxm-empty-ls__description">
                {desc}
            </View>
            <View className="xxm-empty-ls__bottom">{children}</View>
        </View>
    )
}